import BasicLayout from '@/layouts/BasicLayout.vue'
import Purchase from '@/views/price-sheet/Purchase.vue'
import { AuthEnum } from '@/core/enums/auth'

const { ADMIN, AGENT, AGENT_BOSS, SALES, OPERATION, CUSTOMER } = AuthEnum

export default {
  path: '/',
  name: 'index',
  meta: { title: '易百搜（品专）' },
  component: BasicLayout,
  redirect: '/price-package-df',
  children: [
    {
      path: '/price-package',
      name: 'price-package',
      meta: {
        auth: [ADMIN, SALES, AGENT_BOSS, OPERATION],
        title: '新建查价',
        icon: 'Add',
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/price-sheet/PricePackage.vue')
    },
    // {
    //   path: '/price-package-bw',
    //   name: 'price-package-bw',
    //   meta: {
    //     title: '标王查价',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
    //     parent: {
    //       title: '新建查价',
    //       path: 'price-package'
    //     }
    //   },
    //   component: () => import('@/views/price-sheet/price-checking-by-category/BW.vue')
    // },

    {
      path: '/price-package-df',
      name: 'price-package-df',
      meta: {
        title: '百搜优化',
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
        parent: {
          title: '百搜优化',
          path: 'price-package'
        }
      },
      component: () => import('@/views/price-sheet/price-checking-by-category/DF.vue')
    },
    // {
    //   path: '/price-package-cb',
    //   name: 'price-package-cb',
    //   meta: {
    //     title: '词包查价',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
    //     parent: {
    //       title: '新建查价',
    //       path: 'price-package'
    //     }
    //   },
    //   component: () => import('@/views/price-sheet/price-checking-by-category/CB.vue')
    // },
    // {
    //   path: '/price-package-bc',
    //   name: 'price-package-bc',
    //   meta: {
    //     title: '标王百词',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
    //     parent: {
    //       path: 'price-package'
    //     }
    //   }
    // },
    // {
    //   path: '/price-package-sd',
    //   name: 'price-package-sd',
    //   meta: {
    //     title: '标王高定版',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
    //     parent: {
    //       title: '标王高定版',
    //       path: 'price-package'
    //     }
    //   },
    //   component: () => import('@/views/price-sheet/price-checking-by-category/SD.vue')
    // },
    // {
    //   path: '/price-package-wb',
    //   name: 'price-package-wb',
    //   meta: {
    //     title: '精准词包',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
    //     parent: {
    //       path: 'price-package'
    //     }
    //   },
    //   component: () => import('@/views/price-sheet/price-checking-by-category/WB.vue')
    // },
    // {
    //   path: '/price-package-hjbw',
    //   name: 'price-package-hjbw',
    //   meta: {
    //     title: '黄金标王',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
    //     parent: {
    //       title: '新建查价',
    //       path: 'price-package'
    //     }
    //   },
    //   component: () => import('@/views/price-sheet/price-checking-by-category/HJ.vue')
    // },

    {
      path: '/price-manager',
      name: 'price-manager',
      meta: {
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
        title: '查价管理',
        icon: 'HistoryQuery',
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/price-sheet/PriceManager.vue')
    },
    {
      path: '/price-detail',
      name: 'price-detail',
      meta: {
        title: '查价详情',
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
        hidden: true,
        activeMenu: '/price-manager',
        parent: {
          title: '查价管理',
          path: 'manager'
        }
      },
      component: () => import('@/views/price-sheet/PriceDetail.vue')
    },

    {
      path: '/price-purchase',
      name: 'price-purchase',
      meta: {
        title: '提交成功',
        auth: [ADMIN, AGENT, AGENT_BOSS, SALES, OPERATION],
        hidden: true,
        activeMenu: '/price-package',
        parent: {
          title: '新建查价',
          path: 'price-package'
        }
      },
      component: Purchase
    },
    {
      path: '/order-manager',
      name: 'order-manager',
      meta: {
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
        title: '订单管理',
        icon: 'TransactionOrder',
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/order/OrderManager.vue')
    },
    {
      path: '/order-detail',
      name: 'order-detail',
      meta: {
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
        title: '订单详情',
        hidden: true,
        activeMenu: '/order-manager',
        parent: {
          title: '订单管理',
          path: '/order-manager'
        }
      },
      component: () => import('@/views/order/OrderDetail.vue')
    },
    {
      path: '/order-geo/:orderId',
      name: 'order-geo',
      meta: {
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS],
        title: 'GEO优化资料提交',
        hidden: true,
        activeMenu: '/order-geo',
        parent: {
          title: '订单管理',
          path: '/order-manager'
        }
      },
      component: () => import('@/views/order/PlaceOrderView.vue')
    },
    // {
    //   path: '/promotion',
    //   name: 'promotion',
    //   meta: {
    //     title: '推广管理',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS, CUSTOMER],
    //     icon: 'Stretching',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/promotion/Promotion.vue')
    // },

    {
      path: '/promotion/detail',
      name: 'promotion-detail',
      meta: {
        title: '推广明细',
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS, CUSTOMER],
        hidden: true,
        activeMenu: '/promotion',
        parent: {
          title: '推广管理',
          path: '/promotion'
        }
      },
      component: () => import('@/views/promotion/PromotionDetail.vue')
    },
    {
      path: '/promotion/detail/creative',
      name: 'promotion-creative',
      meta: {
        title: '编辑创意',
        auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS, CUSTOMER],
        hidden: true,
        activeMenu: '/promotion',
        parent: [
          {
            title: '推广管理',
            path: '/promotion'
          },
          {
            title: '推广明细',
            path: '/promotion-detail'
          }
        ]
      },
      component: () => import('@/views/promotion/PromotionCreative.vue')
    },
    // {
    //   path: '/dashboard',
    //   name: 'dashboard',
    //   meta: {
    //     title: '数据报表',
    //     auth: [OPERATION, SALES, ADMIN, CUSTOMER],
    //     icon: 'DashboardOne',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/dashboard/index.vue')
    // },
    {
      path: '/premium',
      name: 'premium',
      meta: {
        title: '套餐配置',
        auth: [AGENT_BOSS],
        icon: 'Buy',
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/premium/index.vue')
    },
    // {
    //   path: '/activity-manager',
    //   name: 'activity-manager',
    //   meta: {
    //     title: '活动管理',
    //     auth: [ADMIN, OPERATION],
    //     icon: 'Gift',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/activity/ActivityManager.vue')
    // },
    {
      path: '/activity-detail',
      name: 'activity-detail',
      meta: {
        title: '活动详情',
        auth: [ADMIN, OPERATION],
        hidden: true,
        activeMenu: '/activity-manager',
        parent: [
          {
            title: '活动管理',
            path: '/activity-manager'
          }
        ]
      },
      component: () => import('@/views/activity/ActivityDetail.vue')
    },
    {
      path: '/banned-word',
      name: 'banned-word',
      meta: {
        title: '禁售词管理',
        auth: [OPERATION, ADMIN],
        icon: 'Forbid',
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/word-lib/BannedWord.vue')
    },
    {
      path: '/word-lib',
      name: 'word-lib-word-lib',
      meta: {
        title: '词库管理',
        auth: [OPERATION, ADMIN],
        icon: 'Chinese',
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/word-lib/WordLibrary.vue')
    },
    // {
    //   path: '/consumption',
    //   name: 'word-consumption-word-lib',
    //   meta: {
    //     title: '高消费词管理',
    //     auth: [OPERATION, ADMIN],
    //     icon: 'Chinese',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/word-lib/consumption.vue')
    // },
    /*{
      path: "/monitor",
      name: "monitor",
      meta: {
        title: "热词监控",
        auth: [OPERATION],
        icon: <Analysis theme="outline" size="18" />,
      },
      component: () => import("@/views/monitor/index.vue"),
    },*/
    // {
    //   path: '/diamond-shop',
    //   name: 'diamond-shop',
    //   meta: {
    //     title: '钻石店铺',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS, CUSTOMER],
    //     icon: 'Diamonds',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/diamond-shop/index.vue')
    // },
    // {
    //   path: '/diamond-shops',
    //   name: 'diamond-shops',
    //   meta: {
    //     title: '百搜店铺',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS, CUSTOMER],
    //     icon: 'Diamonds',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/diamond-shops/index.vue')
    // },

    // {
    //   path: '/diamond-shope',
    //   name: 'diamond-shope',
    //   meta: {
    //     title: '续费折扣管理',
    //     auth: [OPERATION, ADMIN],
    //     icon: 'Diamonds',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/word-lib/renewaldiscount.vue')
    // },
    // {
    //   path: '/landing-page',
    //   name: 'landing-page',
    //   meta: {
    //     title: '钻石店铺',
    //     auth: [OPERATION, ADMIN, SALES, AGENT, AGENT_BOSS, CUSTOMER],
    //     icon: 'Diamonds',
    //     parent: {
    //       path: undefined
    //     }
    //   },
    //   component: () => import('@/views/other/LandingPage.vue')
    // },

    // {
    //   path: '/pz-360',
    //   name: 'pz-360',
    //   meta: {
    //     title: '360采购直达',
    //     icon: h(TreasureChest, {
    //       theme: 'outline',
    //       size: '18'
    //     })
    //   },
    //   component: () => import('@/views/pz-360/Pz360.vue')
    // },
    {
      path: '/:pathMatch(.*)*',
      name: '404',
      meta: {
        title: '404',
        hidden: true,
        parent: {
          path: undefined
        }
      },
      component: () => import('@/views/error/404.vue')
    }
  ]
}
